package com.ruiboyun.liveapp.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.ruiboyun.liveapp.R;
import com.ruiboyun.liveapp.base.BaseActivity;
import com.ruiboyun.liveapp.base.Url;
import com.ruiboyun.liveapp.util.tool.EditorShare;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SettingActivity extends BaseActivity {

    @Bind(R.id.back)
    ImageView back;
    @Bind(R.id.port)
    TextView port;



    @Override
    protected int getLayoutId() {
        return R.layout.activity_setting;
    }

    @Override
    protected void afterCreate(@Nullable Bundle savedInstanceState) {
        String clientId = EditorShare.getString(Url.PORT);
        port.setText(clientId);
    }

    @OnClick({R.id.back, R.id.update_port})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                removeStack(this);
                break;
            case R.id.update_port:
                launcher(UpdatePortActivity.class);
                break;
        }
    }
}
